package com.db.yupao.model.enums;


/**
 * 队伍状态枚举
 *
 * @author LYP
 * @ProjectName yupao-back
 * @ClassName TeamStatusEnum
 * @Version 1.0.0
 * @CreateTime 2025/8/23 15:44
 */

public enum TeamStatusEnum {


    PUBLIC(0,"公开"),

    PRIVATE(1,"私有"),

    SECRET(2,"加密");


    public static TeamStatusEnum getEnumByValue(Integer value){
        if(value == null){
            return null;
        }
        TeamStatusEnum[] values = TeamStatusEnum.values();
        for (TeamStatusEnum teamStatusEnum :values){
            if(teamStatusEnum.value == value){
                return teamStatusEnum;
            }
        }
        return null;
    }

    /**
     * 状态码
     */
    private int value;
    /**
     * 状态信息
     */
    private String text;

    TeamStatusEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}
